﻿using System;
using System.Runtime.Serialization;

namespace JTLeigh.Commerce.Spencer.Features.ProductFeedback.Service.Contracts.Runtime.GetProductFeedbackSummaries
{

	/// <summary>
	/// Data contract representing a summary of all quantitative feedback for a single product.
	/// </summary>
	[DataContract(Name = "ProductFeedbackSummary", Namespace = "http://schemas.jtleigh.com/Commerce/Spencer/Features/ProductFeedback/1.0/Runtime/GetProductFeedbackSummaries/")]
	public class ProductFeedbackSummary
	{

		#region Properties

		/// <summary>
		/// Gets or sets the total number of ratings for this product.
		/// </summary>
		[DataMember(Name = "TotalRatings", IsRequired = true)]
		public int TotalRatings { get; set; }

		/// <summary>
		/// Gets or sets the average rating value for this product.
		/// </summary>
		/// <value>A <see cref="Double"/> value, or <see langword="null"/> if there are no ratings
		/// for this product.</value>
		[DataMember(Name = "AverageRatingValue", IsRequired = false)]
		public double? AverageRatingValue { get; set; }

		/// <summary>
		/// Gets or sets the total number of recommendations for this product.
		/// </summary>
		[DataMember(Name = "TotalRecommendations", IsRequired = true)]
		public int TotalRecommendations { get; set; }

		/// <summary>
		/// Gets or sets the number of recommendations for this product that were positive.
		/// </summary>
		[DataMember(Name = "PositiveRecommendations", IsRequired = true)]
		public int PositiveRecommendations { get; set; }

		/// <summary>
		/// Gets or sets the total number of reviews for this product.
		/// </summary>
		[DataMember(Name = "TotalReviews", IsRequired = true)]
		public int TotalReviews { get; set; }

		#endregion // Properties

	}

}
